package io.renren.modules.sale.entiy;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

public class XYContent {

    @JSONField(name = "id")
    private Integer	contentId;
    private Integer	aStatus;
    private Integer	answerUserId;
    private Integer	questionId;
    private Integer	questionUserId;
    private Integer	addAStatus;
    private String	addAnswer;
    private Integer	addAnswerLen;
    private String	addAnswerPic;
    private String	addAnswerText;
    private Integer	addAnswerType;
    private String	addQuestion;
    private String	addTime;
    private Integer	afee;
    private Integer	agreeTimes;
    private Integer	anonymous;
    private String	answer;
    private Integer	answerLen;
    private String	answerPic;
    private String	answerText;
    private String	answerTime;
    private Integer	answerType;
    private Integer	clickTimes;
    private String	content;
    private Integer	crowdFee;
    private Integer	currAttitude;
    private Integer	currUserReadStatus;
    private Integer	expiredStatus;
    private String	expiredTime;
    private Integer	forwardTimes;
    private String	freeListenTime;
    private Integer	id;
    private Integer	isAllowForward;
    private Integer	listAFee;
    private Integer	listenAuthStatus;
    private Integer	listenDispalyStatus;
    private Integer	listenUserTimes;
    private String	moreAddTime;
    private String	moreAnswerTime;
    private Integer	opposeTimes;
    private Integer	payPype;
    private String	pics;
    private Integer	priorLvl;
    private String	publishLocationCircleName;
    private Integer	publishLocationId;
    private String	publishLocationLoupanName;
    private Integer	publishLocationType;
    private Integer	qfee;
    private Integer	qtimes;
    private Integer	replyTimes;
    private Integer	status;
    private Integer	type;

    @JSONField(name = "answerUser")
    private XYUser answerUser;

    @JSONField(name = "qustionUser")
    private  XYUser questionUser;

    public XYUser getAnswerUser() {
        return answerUser;
    }

    public void setAnswerUser(XYUser answerUser) {
        this.answerUser = answerUser;
    }

    public XYUser getQuestionUser() {
        return questionUser;
    }

    public void setQuestionUser(XYUser questionUser) {
        this.questionUser = questionUser;
    }

    public Integer getContentId() {
        return this.contentId;
    }

    public void setContentId(Integer contentId) {
        this.contentId = contentId;
    }

    public Integer getAStatus() {
        return this.aStatus;
    }

    public void setAStatus(Integer aStatus) {
        this.aStatus = aStatus;
    }

    public Integer getAnswerUserId() {
        return this.answerUserId;
    }

    public void setAnswerUserId(Integer answerUserId) {
        this.answerUserId = answerUserId;
    }

    public Integer getQuestionId() {
        return this.questionId;
    }

    public void setQuestionId(Integer questionId) {
        this.questionId = questionId;
    }

    public Integer getQuestionUserId() {
        return this.questionUserId;
    }

    public void setQuestionUserId(Integer questionUserId) {
        this.questionUserId = questionUserId;
    }

    public Integer getAddAStatus() {
        return this.addAStatus;
    }

    public void setAddAStatus(Integer addAStatus) {
        this.addAStatus = addAStatus;
    }

    public String getAddAnswer() {
        return this.addAnswer;
    }

    public void setAddAnswer(String addAnswer) {
        this.addAnswer = addAnswer;
    }

    public Integer getAddAnswerLen() {
        return this.addAnswerLen;
    }

    public void setAddAnswerLen(Integer addAnswerLen) {
        this.addAnswerLen = addAnswerLen;
    }

    public String getAddAnswerPic() {
        return this.addAnswerPic;
    }

    public void setAddAnswerPic(String addAnswerPic) {
        this.addAnswerPic = addAnswerPic;
    }

    public String getAddAnswerText() {
        return this.addAnswerText;
    }

    public void setAddAnswerText(String addAnswerText) {
        this.addAnswerText = addAnswerText;
    }

    public Integer getAddAnswerType() {
        return this.addAnswerType;
    }

    public void setAddAnswerType(Integer addAnswerType) {
        this.addAnswerType = addAnswerType;
    }

    public String getAddQuestion() {
        return this.addQuestion;
    }

    public void setAddQuestion(String addQuestion) {
        this.addQuestion = addQuestion;
    }

    public String getAddTime() {
        return this.addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = formatTime(addTime);
    }

    public Integer getAfee() {
        return this.afee;
    }

    public void setAfee(Integer afee) {
        this.afee = afee;
    }

    public Integer getAgreeTimes() {
        return this.agreeTimes;
    }

    public void setAgreeTimes(Integer agreeTimes) {
        this.agreeTimes = agreeTimes;
    }

    public Integer getAnonymous() {
        return this.anonymous;
    }

    public void setAnonymous(Integer anonymous) {
        this.anonymous = anonymous;
    }

    public String getAnswer() {
        return this.answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getAnswerLen() {
        return this.answerLen;
    }

    public void setAnswerLen(Integer answerLen) {
        this.answerLen = answerLen;
    }

    public String getAnswerPic() {
        return this.answerPic;
    }

    public void setAnswerPic(String answerPic) {
        this.answerPic = answerPic;
    }

    public String getAnswerText() {
        return this.answerText;
    }

    public void setAnswerText(String answerText) {
        this.answerText = answerText;
    }

    public String getAnswerTime() {
        return this.answerTime;
    }

    public void setAnswerTime(String answerTime) {
        this.answerTime = formatTime(answerTime);
    }

    public Integer getAnswerType() {
        return this.answerType;
    }

    public void setAnswerType(Integer answerType) {
        this.answerType = answerType;
    }

    public Integer getClickTimes() {
        return this.clickTimes;
    }

    public void setClickTimes(Integer clickTimes) {
        this.clickTimes = clickTimes;
    }

    public String getContent() {
        return this.content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getCrowdFee() {
        return this.crowdFee;
    }

    public void setCrowdFee(Integer crowdFee) {
        this.crowdFee = crowdFee;
    }

    public Integer getCurrAttitude() {
        return this.currAttitude;
    }

    public void setCurrAttitude(Integer currAttitude) {
        this.currAttitude = currAttitude;
    }

    public Integer getCurrUserReadStatus() {
        return this.currUserReadStatus;
    }

    public void setCurrUserReadStatus(Integer currUserReadStatus) {
        this.currUserReadStatus = currUserReadStatus;
    }

    public Integer getExpiredStatus() {
        return this.expiredStatus;
    }

    public void setExpiredStatus(Integer expiredStatus) {
        this.expiredStatus = expiredStatus;
    }

    public String getExpiredTime() {
        return this.expiredTime;
    }

    public void setExpiredTime(String expiredTime) {
        this.expiredTime = formatTime(expiredTime);
    }

    public Integer getForwardTimes() {
        return this.forwardTimes;
    }

    public void setForwardTimes(Integer forwardTimes) {
        this.forwardTimes = forwardTimes;
    }

    public String getFreeListenTime() {
        return this.freeListenTime;
    }

    public void setFreeListenTime(String freeListenTime) {
        this.freeListenTime = formatTime(freeListenTime);
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getIsAllowForward() {
        return this.isAllowForward;
    }

    public void setIsAllowForward(Integer isAllowForward) {
        this.isAllowForward = isAllowForward;
    }

    public Integer getListAFee() {
        return this.listAFee;
    }

    public void setListAFee(Integer listAFee) {
        this.listAFee = listAFee;
    }

    public Integer getListenAuthStatus() {
        return this.listenAuthStatus;
    }

    public void setListenAuthStatus(Integer listenAuthStatus) {
        this.listenAuthStatus = listenAuthStatus;
    }

    public Integer getListenDispalyStatus() {
        return this.listenDispalyStatus;
    }

    public void setListenDispalyStatus(Integer listenDispalyStatus) {
        this.listenDispalyStatus = listenDispalyStatus;
    }

    public Integer getListenUserTimes() {
        return this.listenUserTimes;
    }

    public void setListenUserTimes(Integer listenUserTimes) {
        this.listenUserTimes = listenUserTimes;
    }

    public String getMoreAddTime() {
        return this.moreAddTime;
    }

    public void setMoreAddTime(String moreAddTime) {
        this.moreAddTime = formatTime(moreAddTime);
    }

    public String getMoreAnswerTime() {
        return this.moreAnswerTime;
    }

    public void setMoreAnswerTime(String moreAnswerTime) {
        this.moreAnswerTime = formatTime(moreAnswerTime);
    }

    public Integer getOpposeTimes() {
        return this.opposeTimes;
    }

    public void setOpposeTimes(Integer opposeTimes) {
        this.opposeTimes = opposeTimes;
    }

    public Integer getPayPype() {
        return this.payPype;
    }

    public void setPayPype(Integer payPype) {
        this.payPype = payPype;
    }

    public String getPics() {
        return this.pics;
    }

    public void setPics(String pics) {
        this.pics = pics;
    }

    public Integer getPriorLvl() {
        return this.priorLvl;
    }

    public void setPriorLvl(Integer priorLvl) {
        this.priorLvl = priorLvl;
    }

    public String getPublishLocationCircleName() {
        return this.publishLocationCircleName;
    }

    public void setPublishLocationCircleName(String publishLocationCircleName) {
        this.publishLocationCircleName = publishLocationCircleName;
    }

    public Integer getPublishLocationId() {
        return this.publishLocationId;
    }

    public void setPublishLocationId(Integer publishLocationId) {
        this.publishLocationId = publishLocationId;
    }

    public String getPublishLocationLoupanName() {
        return this.publishLocationLoupanName;
    }

    public void setPublishLocationLoupanName(String publishLocationLoupanName) {
        this.publishLocationLoupanName = publishLocationLoupanName;
    }

    public Integer getPublishLocationType() {
        return this.publishLocationType;
    }

    public void setPublishLocationType(Integer publishLocationType) {
        this.publishLocationType = publishLocationType;
    }

    public Integer getQfee() {
        return this.qfee;
    }

    public void setQfee(Integer qfee) {
        this.qfee = qfee;
    }

    public Integer getQtimes() {
        return this.qtimes;
    }

    public void setQtimes(Integer qtimes) {
        this.qtimes = qtimes;
    }

    public Integer getReplyTimes() {
        return this.replyTimes;
    }

    public void setReplyTimes(Integer replyTimes) {
        this.replyTimes = replyTimes;
    }

    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return this.type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    private static String formatTime(String timestampString){
        if (null == timestampString || StrUtil.isEmpty(timestampString)){
            return null;
        }
        Date timestamp = DateUtil.date(Long.parseLong(timestampString));
        return DateUtil.format(timestamp, "yyyy-MM-dd HH:mm:ss");
    }

}
